#ifndef GLVIEW_H
#define GLVIEW_H

#include <GL/glew.h>

#include <QShortcut>

#include <QGLWidget>

#include "Troll3D/Entity.h"
#include "Troll3D/GLContext.h"
#include "Troll3D/Material.h"
#include "Troll3D/UniformMat4.h"
#include "Troll3D/Image.h"
#include "Troll3D/View.h"

#include "QKeyEvent"
#include <GeoTool/Matrix.h>
#include "QDebug"
#include <QMouseEvent>


/*******************************************
 *      @brief La classe Gl view hérite de QGLWidget et sert à afficher une scene opengl
 *      à l'intérieur d'un widget qt
 *****************************************************/
class GLView : public QGLWidget
{
public:


    GLView();
    GLContext   *   context;
    Mesh        *   mesh;
    Entity      *   enti;
     Entity * enti2;
    View        *   viewEntity;
    protected :

    virtual void initializeGL();
    virtual void paintGL();
    virtual void resizeGL(int w, int h);

    int anchorX;
    int anchorY;
    Image * img;
    bool pressed;

    void mouseMoveEvent(QMouseEvent * event);
    void mouseReleaseEvent(QMouseEvent * event);
    void keyPressEvent(QKeyEvent * key);

    private:

};


#endif // GLVIEW_H
